<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'category-form',
	'enableAjaxValidation'=>false,
	'htmlOptions'=>array('enctype'=>'multipart/form-data'),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'英文名称'); ?>
		<?php echo $form->textField($model,'ENName',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'ENName'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'中文名称'); ?>
		<?php echo $form->textField($model,'ZHName',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'ZHName'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'上级分类'); ?>
		<?php echo $form->dropDownList($model,'ParentID',$cateDatas); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'图片路径'); ?>
		<?php echo $form->fileField($model,'PicPath',array('size'=>50)); ?>
		<?php echo $form->error($model,'PicPath'); ?>
	</div>
	<?php if(isset($model->PicPath) && !empty($model->PicPath)){?>
	<div class="row">
		<?php echo $form->labelEx($model,'上传图片'); ?>
		<a href="#"><img src="<?php echo $model->PicPath;?>" width="90" height="60"/></a>
		<?php echo $form->hiddenField($model,'PicPath',array('size'=>50));?>
	</div>
	<?php }?>
	<div class="row">
		<?php echo $form->labelEx($model,'是否可用'); ?>
		<?php echo $form->dropDownList($model,'Flag',$flagDatas); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Creat' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->